1. Field of the Invention
This invention relates to a multiprocessor computer and a program which can assign tasks to a plurality of processors, in particular, a multiprocessor computer and a program which can level the heat emissions among the processors and suppress occurrence of stop of processing due to overheating.
2. Description of the Related Art
In the field of controlling the lines in factories and plants, widely used are computers performing control in synchronization with real time with which the object to be controlled operates. Such computers are equipped with hardware and software designed to achieve real-time processing.
Real-time processing is used for not only control processes in factories but also business information management processes and electronic commerce processes, and video process in multimedia processes.
As computers of this kind, used is a multiprocessor computer which simultaneously uses a plurality of processors, if a required processing power is higher than a processing power of a single processor.
In many multiprocessor computers, a plurality of processes are assigned to one processor to use not only real-time processing but also the processing capability of each processor effectively.
When performing a process, a multiprocessor computer divides the process into processing units, i.e., tasks, assigns processors of numbers necessary for executing respective tasks, and executes the tasks. If a task requires a plurality of processors, an execution unit to be processed on each processor may be called a thread. Further, if a task and threads forming the task are executed over a plurality of periods on a processor, each period may be called a job. For example, a task which requires two processors is periodically executed, the task is formed of two threads, the number of which is the same as the number of processors to be used, and each thread is periodically executed as a job.
If a plurality of tasks are executed in a multiprocessor computer, it is necessary to schedule to determine the execution order of the tasks. Between scheduling methods, there is a scheduling method called static scheduling in which the execution order of all jobs is determined prior to start of execution of tasks and the jobs thereof. The static scheduling methods can be classified into an offline scheduling method and an online scheduling method. The offline scheduling method schedules all the tasks before operation of the computer system. The online scheduling method performs scheduling when tasks to be actually executed are determined during operation of the system. Adopting the online scheduling method enables execution of only necessary tasks, in accordance with change in the object to be controlled during operation and user's request.
In the meantime, assigning jobs to processors which actually execute the jobs is called “dispatching”. In the static scheduling method, scheduling is performed in advance, and dispatching is dynamically performed in execution of jobs.
A multiprocessor computer having the above structure has no particular problem under normal conditions. However, according to the inventors' study, such a multiprocessor computer performs scheduling and dispatching in consideration of only processing performance and real-time processing. Therefore, the heat emission becomes unlevel among the processors, and noise (the sound of a fan, etc.) caused by cooling of the heated processors increases. In the end, stop of processing may occur due to overheating.